<div class="wrapper-main">
    <div class="headlabel"><?php echo $this->__("CATALOG") ?></div>
    <div class="content-catalog">
            <!--
            <ul class="list-catalog">
                <?php 
                    $alpha = $this->getRequest()->getParam("alpha");
                    $catalogList = $this->getCatalog($alpha);
                ?>
                <?php for ($i = 97 ;$i <= 122; $i++): ?>
                    <?php $letter = chr($i); ?>
                    <?php if($alpha==$letter): ?>
                        <li><a class="current" href="<?php echo $this->getUrl("home/index/catalog")."?alpha=$letter" ?>"><?php echo $letter ?></a></li>
                    <?php else:?>
                        <li><a href="<?php echo $this->getUrl("home/index/catalog")."?alpha=$letter" ?>"><?php echo $letter ?></a></li>
                    <?php endif;?>
                <?php endfor;?>
                
                
            </ul>
            <a class="view-all" href="<?php echo $this->getUrl("home/index/catalog") ?>"><?php echo $this->__("VIEW ALL") ?></a>
            -->
        
        <?php if(count($catalogList) > 0): ?>
            <?php $i = 1; ?>
            <?php $k = 0; ?>
                <?php foreach ($catalogList as $catalog): ?>
                     <?php $category_id = $catalog->getId() ?>
                     <?php if($i%3 == 1): ?>
                        <?php if($k%2==0): ?>
                            <?php $class = "list-catalog" ?>
                        <?php else:?>
                            <?php $class = "list-catalog odd" ?>
                        <?php endif;?>
                    
                        <ul class="<?php echo $class ?>">
                    <?php endif;?>
                        <li>
                            <?php $pdfName = Mage::getModel("catalog/category")->load($catalog->getId())->getPdfName() ?>
                            
                            
                            <?php if(!empty($pdfName)): ?>
                                <?php $filePath = Mage::getBaseDir("media")."/catalog/pdf/$pdfName".".pdf"; ?>
                            <?php endif;?>
                            
                            
                            <?php if(!empty($filePath)): ?>
                                <a  class="catalog" target="_blank" href="<?php echo $this->getUrl("home/index/exportPdfCatalog/category_id/$category_id") ?>" ><img src="<?php echo $this->getSkinUrl("images/pdf-list.png"); ?>" /></a>
                            <?php endif ?>
                            <?php if(!empty($pdfName)): ?>
                                <a href="<?php echo $this->getUrl("home/index/exportPdfCatalog/category_id/$category_id") ?>">
                                        <?php echo $catalog->getName() ?>
                                </a>
                            <?php else: ?>
                                <a href="javascript:void(0)"><?php echo $this->__("Updating Pdf File") ?></a>
                            <?php endif ?>
                        </li>
                    <?php if($i%3 == 0): ?>
                        <?php $k++ ?>
                        </ul>
                    <?php endif; ?>
                    <?php $i++ ?>
                <?php endforeach; ?>
            
        <?php endif; ?>
    </div>

</div>